home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1993…stman Always Clicks Twice / ADC Developer CD (1993-01) (''The Postman Always Clicks Twice'')_iso / Dev.CD 199301.iso / Development Platforms / Apple II / Essentials / MPW IIGS Interfaces / PIIGSIncludes / AppleTalk.p < prev    next >
Encoding:
Text File  |  1991-10-28  |  47.1 KB  |  1,345 lines  |  [TEXT/MPS ]

  1. {********************************************
  2. ; File: AppleTalk.p
  3. ;
  4. ;
  5. ; Copyright Apple Computer, Inc. 1986-90
  6. ; All Rights Reserved
  7. ;
  8. ********************************************}
  9.  
  10. UNIT APPLETALK;
  11.  
  12. INTERFACE
  13.  
  14. USES TYPES;
  15.  
  16. CONST
  17. { Command Numbers }
  18. atGetInfoCommand = $0002;
  19. atGetGlobalCommand = $0003;
  20. atInstallTimerCommand = $0004;
  21. atRemoveTimerCommand = $0005;
  22. atBootCommand = $0006;
  23. atCancelTimerCommand = $0045;
  24.  
  25. { Link Access Protocol Codes }
  26. lapWriteCommand = $0007;
  27. lapReadBufferCommand = $0008;
  28. lapAttachProtCommand = $0009;
  29. lapRemoveProtCommand = $000A;
  30.  
  31. { Datagram Delivery Protocol Codes }
  32. ddpOpenSocketCommand = $000B;
  33. ddpCloseSocketCommand = $000C;
  34. ddpSendDatagramCommand = $000D;
  35.  
  36. { Name Binding Protocol Codes }
  37. nbpRegisterNameCommand = $000E;
  38. nbpRemoveNameCommand = $000F;
  39. nbpLookupNameCommand = $0010;
  40. nbpConfirmNameCommand = $0011;
  41. nbpKillCommand = $0046;
  42.  
  43. { AppleTalk Transaction Protocol Codes }
  44. atpSendReqCommand = $0012;
  45. atpCancelReqCommand = $0013;
  46. atpOpenSocketCommand = $0014;
  47. atpCloseSocketCommand = $0015;
  48. atpGetReqCommand = $0016;
  49. atpSendRespCommand = $0017;
  50. atpRelCBCommand = $0019;
  51.  
  52. { Zone Information Protocol Codes }
  53. zipGetMyZoneCommand = $001A;
  54. zipGetZoneListCommand = $001B;
  55.  
  56. { AppleTalk Session Protocol Codes }
  57. aspGetParmsCommand = $001C;
  58. aspGetStatusCommand = $001D;
  59. aspOpenSessionCommand = $001E;
  60. aspCloseSessionCommand = $001F;
  61. aspCommandCommand = $0020;
  62. aspWriteCommand = $0021;
  63.  
  64. { Printer Access Protocol Codes }
  65. papStatusCommand = $0022;
  66. papOpenCommand = $0023;
  67. papCloseCommand = $0024;
  68. papReadCommand = $0025;
  69. papWriteCommand = $0026;
  70. papUnloadCommand = $0027;
  71.  
  72. { Remote Print Manager Codes }
  73. rpmSetPrinterCommand = $0028;
  74. rpmCloseSessionCommand = $0047;
  75. rpmFlushSessionCommand = $0048;
  76.  
  77. { ProDOS Filing Interface Codes }
  78. pfiUserPrefixCommand = $002A;
  79. pfiLoginCommand = $002B;
  80. pfiLoginContCommand = $002C;
  81. pfiLogOutCommand = $002D;
  82. pfiMountVolCommand = $002E;
  83. pfiListSessionsCommand = $002F;
  84. pfiTimeZoneCommand = $0030;
  85. pfiGetSrcPathCommand = $0031;
  86. pfiAccessCommand = $0032;
  87. pfiNamingCommand = $0033;
  88. pfiConvertTimeCommand = $0034;
  89. pfiSetBufferCommand = $0036;
  90. pfiHooksCommand = $0037;
  91. pfiLogin2Command = $0038;
  92. pfiListSessions2Command = $0039;
  93. pfiGetSVersionCommand = $003A;
  94.  
  95. { Error Codes }
  96. appleTalkNetError = $8888; { AppleTalk Network Error }
  97. atInvalidCmdErr = $0101;  { Invalid command }
  98. atMemoryErr = $0102;  { Heap/memory management error }
  99. atTimerNotInstalledErr = $0103;  { No timer installed error }
  100. atSyncErr = $0104;  { Syncronous only call }
  101. atTooManyTimes = $0105;  { Too many times }
  102. atTimerCancelled = $0106;
  103.  
  104. { LAP Error Codes }
  105. lapNoPacketErr = $0201;  { No packet in buffer }
  106. lapEOBErr = $0202;  { End of buffer }
  107. lapLenErr = $0203;  { LAP data too large }
  108. lapFailedErr = $0204;  { Retry count exhausted }
  109. lapTypeErr = $0205;  { Illegal LAP type }
  110. lapDuplicateErr = $0206;  { Duplicate LAP type }
  111. lapProtocolErr = $0207;  { Too many protocols }
  112. lapTypeFoundErr = $0208;  { Type not found }
  113. lapDataLostErr = $0209;  { Data lost in Purge }
  114.  
  115. { DDP Error Codes }
  116. ddpSktNumErr = $0301;  { Too many sockets open }
  117. ddpSktErr = $0302;  { Socket not open }
  118. ddpSktOpenErr = $0303;  { Socket already open }
  119. ddpSktTypeErr = $0304;  { Invalid Socket Type }
  120. ddpLenErr = $0305;  { DDP length error }
  121. ddpBridgeErr = $0306;  { No bridge available }
  122.  
  123. { NBP Error Codes }
  124. nbpNameNumberErr = $0401;  { Too many names }
  125. nbpNameExistErr = $0402;  { Name already exists }
  126. nbpNameFoundErr = $0403;  { Name not found }
  127. nbpBufferErr = $0404;  { User buffer full }
  128. nbpWildcardErr = $0405;  { Wildcard not allowed }
  129. nbpNameErr = $0406;  { Invalid name format }
  130. nbpAddressErr = $0407;  { Incorrect address }
  131. nbpProcessErr = $0408;  { Too many NBP processes }
  132. nbpAbortErr = $0409;  { NBP Aborted }
  133. nbpParmBlkNotFndErr = $040A;  { NBP Param Block not found }
  134.  
  135. { ATP Error Codes }
  136. atpDataLenErr = $0501;  { ATP data too large }
  137. atpSocketErr = $0502;  { Invalid ATP socket }
  138. atpControlBlkErr = $0503;  { ATP control block not found }
  139. atpProcessErr = $0504;  { Too many active ATP calls }
  140. atpReleaseErr = $0505;  { No release received }
  141. atpNoRespActive = $0506;  { No response active }
  142. atpRespErr = $0507;  { No send response active }
  143. atpReqErr = $0508;  { ATP send request aborted }
  144. atpSktClosedErr = $0509;  { socket closed error }
  145. atpTooManySkts = $050A;  { Too many ATP sockets }
  146. atpTooManyResp = $050B;  { Too many responses expected }
  147. atpDDPSktErr = $050C;  { Unable to open DDP socket }
  148. atpSndRespRelErr = $050D;  { ATP Send Response was released }
  149.  
  150. { ZIP Error Codes }
  151. zipNetworkErr = $0601;  { Network error }
  152. zipOverflow = $0602;  { ZIP overflow }
  153. zipNotFound = $0603;  { ZIP not found }
  154.  
  155. { ASP Error Codes }
  156. aspNetworkErr = $0701;  { Network error }
  157. aspSessNumErr = $0702;  { Too many sessions }
  158. aspRefErr = $0703;  { Invalid reference number }
  159. aspSizeErr = $0704;  { Size error }
  160. aspBufErr = $0705;  { Buffer error }
  161. aspNoRespErr = $0706;  { No response from server }
  162. aspBadVersion = $0707;  { Bad version number }
  163. aspTooManySessions = $0708;  { Too many sessions }
  164. aspServBusyErr = $0709;  { Server busy }
  165. aspSessionClosed = $070A;  { Session closed }
  166.  
  167. { PAP Error Codes }
  168. papSessNumErr = $0801;  { Too many sessions }
  169. papRefErr = $0802;  { Invalid Reference }
  170. papQuantumErr = $0803;  { Quantum Error }
  171. papCommandErr = $0804;  { Too many commands }
  172. papNameErr = $0805;  { Name not found }
  173. papSessionErr = $0806;  { Session closed }
  174. papNetworkErr = $0807;  { Network error }
  175. papServRespErr = $0808;  { Server not responding }
  176. papServBusyErr = $0809;  { Server busy }
  177. papBuffSizeErr = $080A;  { Buffer size error }
  178. papInUseErr = $080B;  { PAP in use }
  179.  
  180. { RPM Error Codes }
  181. rpmInvalidFlagErr = $0901;
  182. rpmInvalidTimeErr = $0902;
  183.  
  184. { PFI Error Codes }
  185. pfiTooManySessErr = $0A01;  { Too many sessions }
  186. pfiUnableOpenSessErr = $0A02;  { Unable to open session }
  187. pfiNoRespFrmSrvrErr = $0A03;  { No response from server }
  188. pfiLoginContErr = $0A04;  { Login continue }
  189. pfiInvalidNameErr = $0A05;  { Invalid name }
  190. pfiInvalidSessNumErr = $0A06;  { Invalid Sess reference # or unknown volume }
  191. pfiUnableOpenVolErr = $0A07;  { Unable to open volume }
  192. pfiTooManyVolsOpenErr = $0A08;  { Too many mounted volumes }
  193. pfiVolNotMountedErr = $0A09;  { Volume Not Mounted }
  194. pfiUnableSetCreatorErr = $0A0A;
  195. pfiBufferToSmallErr = $0A0B;  { Buffer to small }
  196. pfiTimeFlagErr = $0A0C;  { Time flag error }
  197. pfiUnableTSetGroupErr = $0A0D;  { Unable to set group }
  198. pfiDirNotFoundErr = $0A0E;  { Directory not found }
  199. pfiAccessDeniedErr = $0A0F;  { Access denied }
  200. pfiMiscellaneousErr = $0A10;  { Miscellaneous error }
  201. pfiVolAlreadyMntedErr = $0A11;  { Volume already mounted }
  202. pfiUnableGetCreatorErr = $0A12;  { Unable to get creator/group }
  203. pfiAlrdyLggedOnSrvrErr = $0A13;  { Already logged onto server }
  204. pfiTimeError = $0A14;  { Time error }
  205. pfiUserNotAuthorizedErr = $0A15;  { User not authorized }
  206. pfiParamterErr = $0A16;  { Parameter error }
  207. pfiSrvrGoingDownErr = $0A17;  { Server going down }
  208. pfiBadUAMErr = $0A18;  { Bad UAM }
  209. pfiBadVersionNumErr = $0A19;  { Bad version number }
  210.  
  211. { ATInit offsets }
  212. atInitUserName = $0085;
  213. atInitPrinterFlags = $0064;
  214. atInitPrinterTuple = $0063;
  215. atInitPrefix = $00C6;
  216. atInitPrefixDirID = $00CA;
  217. atInitPrefixVolID = $00CC;
  218. atInitPath = $010D;
  219. atInitPathDirID = $0111;
  220. atInitPathVolID = $0113;
  221.  
  222. { ATGetInfoRec.hardwareID flags }
  223. hidAppleIIGS = $0000;
  224.  
  225. { ATInstallTimerRec.ticksToComplete values  }
  226. atMaxTicks = $FFFF;
  227. atMaxTicksIIe = $1FFF;
  228.  
  229. { LAPReadBufferRec.purge values }
  230. lapPurgeOff = $0000;
  231. lapPurgeOn = $0001;
  232.  
  233. { DDPSendDatagramRec.checksum values }
  234. ddpChecksumOff = $00;
  235. {$IFC UNDEFINED ddpChecksumOn }
  236. ddpChecksumOn = $01;
  237. {$SETC ddpChecksumOn := 0}
  238. {$ENDC}
  239.  
  240. { NBPRegsterNameRec.checkFlag values }
  241. nbpCheckNameOn = $00;
  242. nbpCheckNameOff = $01;
  243.  
  244. {
  245.     ATPSendReqRec.atpFlags and 
  246.     ATPGetReqRec.atpFlags values
  247. }
  248.  
  249. atpExactlyOnceMask = $20;
  250.  
  251. { ATPSendReqRec.result value (low byte) }
  252. atpExecuting = $FF;
  253.  
  254. { ATPOpenSocketRec.socketID values }
  255. atpDynamicSocket = $00;
  256.  
  257. { ASPAttenHeaderRec.attenType values }
  258. aspAttenNormal = $00;
  259. {$IFC UNDEFINED aspAttenTimeout }
  260. aspAttenTimeout = $40;
  261. {$SETC aspAttenTimeout := 0}
  262. {$ENDC}
  263. aspAttenClosed = $80;
  264.  
  265. { RPMSetPrinterRec.timeOut values }
  266. {$IFC UNDEFINED rpmTimeOutOff }
  267. rpmTimeOutOff = $0000;
  268. {$SETC rpmTimeOutOff := 0}
  269. {$ENDC}
  270.  
  271. { RPMSetPrinterRec.rpmFlags masks }
  272. rpmNetworkMask = $80;
  273. rpmPostscriptMask = $20;
  274. {$IFC UNDEFINED rpmReturnNameMask }
  275. rpmReturnNameMask = $01;
  276. {$SETC rpmReturnNameMask := 0}
  277. {$ENDC}
  278.  
  279. { PFIMountVolRec.mountFlag masks }
  280. pfiMountMask = $80;
  281. {$IFC UNDEFINED pfiPasswordMask }
  282. pfiPasswordMask = $40;
  283. {$SETC pfiPasswordMask := 0}
  284. {$ENDC}
  285. {$IFC UNDEFINED pfiUserVolumeMask }
  286. pfiUserVolumeMask = $01;
  287. {$SETC pfiUserVolumeMask := 0}
  288. {$ENDC}
  289.  
  290. { PFITimeZoneRec.timeFlag masks }
  291. {$IFC UNDEFINED pfiEastWestMask }
  292. pfiEastWestMask = $80;
  293. {$SETC pfiEastWestMask := 0}
  294. {$ENDC}
  295. pfiHoursAwayMask = $7F;
  296.  
  297. { PFIAccessRec.directionalFlag masks }
  298. pfiSetAccessMask = $80;
  299. pfiCreatorMask = $40;
  300. pfiGroupMask = $20;
  301.  
  302. { PFINamingRec masks }
  303. pfiDNCMask = $80;  { PFI Directional Naming Convention Mask }
  304. pfiDDTMask = $40;  { PFI Directional Device Table Mask }
  305. pfiNNCMask = $80;  { PFI Naming Naming Convention Mask }
  306. pfiNDTMask = $40;  { PFI Naming Device Table Mask }
  307.  
  308. { LAPAttachProtRec.protType values }
  309. lapProtTypeMin = $01;
  310. lapProtTypeMax = $7F;
  311. lapProtTypeAll = $FF;
  312.  
  313. { Socket Range values }
  314. atpSocketDynamicMin = $80;
  315. atpSocketDynamicMax = $FE;
  316. atpSocketStaticMin = $01;
  317. atpSocketStaticMax = $7F;
  318.  
  319. { Buffer length constants }
  320. zipGetMyZoneBufLenMin = $21;
  321. papOpenStatusBufLenMin = $0104;
  322. pfiUserNameLenMax = $0040;
  323.  
  324. { Other misc constants }
  325. {$IFC UNDEFINED workstationGS }
  326. workstationGS = $0000;
  327. {$SETC workstationGS := 0}
  328. {$ENDC}
  329. endOfBDS = $FFFF;
  330. ddpInvalidClient = $00;
  331. atpActualLengthMask = $7FFF;
  332. atpActualLengthOvflw = $8000;
  333. atpUnusedAddRtnPtr = $00000000;
  334. atpUnusedAddBitMap = $00;
  335. pfiAFPVersion11 = $0101;
  336. pfiAFPVersion20 = $0200;
  337. pfiAFPTimeFormat = $0000;
  338. pfiProDOSTimeFormat = $0001;
  339. pfiHooksSetHooks = $40;
  340. pfiHooksP8Active = $80;
  341. pfiSetWriteBuffer = $80;
  342. papReadNotEOF = $00;
  343.  
  344. TYPE
  345. EntName = RECORD
  346.     buffer : PACKED ARRAY[1..99] OF Byte;
  347. END;
  348.  
  349. GetMyZoneBuf = PACKED ARRAY [1..zipGetMyZoneBufLenMin] of Byte;
  350. PAPOpenStatusBuf = PACKED ARRAY [1..papOpenStatusBufLenMin] of Byte;
  351. PFIUserName = PACKED ARRAY [1..pfiUserNameLenMax] of Byte;
  352.  
  353. ATInitTailRecHndl = ^ATInitTailRecPtr;
  354. ATInitTailRecPtr = ^ATInitTailRec;
  355. ATInitTailRec = PACKED RECORD
  356.     pathVolID : Integer;
  357.     pathDirID : Longint;
  358.     path : PACKED ARRAY[1..65] OF CHAR;
  359.     prefixVolID : Integer;
  360.     prefixDirID : Longint;
  361.     prefix : PACKED ARRAY[1..65] OF CHAR;
  362.     userName : PACKED ARRAY[1..33] OF CHAR;
  363.     printerFlags : Byte;
  364.     printerTuple : PACKED ARRAY[1..99] OF Byte;
  365. END;
  366.  
  367. ATGetInfoRecHndl = ^ATGetInfoRecPtr;
  368. ATGetInfoRecPtr = ^ATGetInfoRec;
  369. ATGetInfoRec = PACKED RECORD
  370.     async : Byte;
  371.     command : Byte;
  372.     result : Integer;
  373.     completionRtn : Longint;
  374.     thisNet : Integer;
  375.     aBridge : Byte;
  376.     hardwareID : Byte;
  377.     romVersion : Integer;
  378.     nodeNumber : Byte;
  379. END;
  380.  
  381. ATGetGlobalRecHndl = ^ATGetGlobalRecPtr;
  382. ATGetGlobalRecPtr = ^ATGetGlobalRec;
  383. ATGetGlobalRec = PACKED RECORD
  384.     async : Byte;
  385.     command : Byte;
  386.     result : Integer;
  387.     bufferPtr : Ptr;
  388. END;
  389.  
  390. ATGetGlobalBufferHndl = ^ATGetGlobalBufferPtr;
  391. ATGetGlobalBufferPtr = ^ATGetGlobalBuffer;
  392. ATGetGlobalBuffer = PACKED RECORD
  393.     lapDestinationNode : Byte; (* JAM 91.08.13 per Jim Luther memo *)
  394.         (* In previous versions, this had been destinationNode,
  395.             doubly defined with a field declared elsewhere in this
  396.             record.
  397.         *)
  398.     lapSourceNode : Byte;
  399.     lapType : Byte;
  400.     hopCountDL : Byte;
  401.     datagramLength : Byte;
  402.     ddpChecksum : Integer;
  403.     destNetwork : Integer;
  404.     sourceNetwork : Integer;
  405.     destinationNode : Byte;
  406.     sourceNode : Byte;
  407.     destinationSocket : Byte;
  408.     sourceSocket : Byte;
  409.     ddpType : Byte;
  410.     packetLength : Integer;
  411. END;
  412.  
  413. ATInstallTimerRecHndl = ^ATInstallTimerRecPtr;
  414. ATInstallTimerRecPtr = ^ATInstallTimerRec;
  415. ATInstallTimerRec = PACKED RECORD
  416.     async : Byte;
  417.     command : Byte;
  418.     result : Integer;
  419.     completionRtn : Longint;
  420.     runningTickCount : Integer;
  421.     ticksToComplete : Integer;
  422.     reserved : Ptr;
  423. END;
  424.  
  425. ATRemoveTimerRecHndl = ^ATRemoveTimerRecPtr;
  426. ATRemoveTimerRecPtr = ^ATRemoveTimerRec;
  427. ATRemoveTimerRec = PACKED RECORD
  428.     async : Byte;
  429.     command : Byte;
  430.     result : Integer;
  431.     reserved : PACKED ARRAY[1..12] OF Byte;
  432. END;
  433.  
  434. ATBootRecHndl = ^ATBootRecPtr;
  435. ATBootRecPtr = ^ATBootRec;
  436. ATBootRec = PACKED RECORD
  437.     async : Byte;
  438.     command : Byte;
  439.     result : Integer;
  440. END;
  441.  
  442. ATCancelTimerRecHndl = ^ATCancelTimerRecPtr;
  443. ATCancelTimerRecPtr = ^ATCancelTimerRec;
  444. ATCancelTimerRec = PACKED RECORD
  445.     async : Byte;
  446.     command : Byte;
  447.     result : Integer;
  448.     reserved : PACKED ARRAY[1..12] OF Byte;
  449. END;
  450.  
  451. ASPAttentionHeaderRecHndl = ^ASPAttentionHeaderRecPtr;
  452. ASPAttentionHeaderRecPtr = ^ASPAttentionHeaderRec;
  453. ASPAttentionHeaderRec = PACKED RECORD
  454.     sessionRefNum : Byte;
  455.     attenType : Byte;
  456.     atten : Integer;
  457. END;
  458.  
  459. ASPGetParmsRecHndl = ^ASPGetParmsRecPtr;
  460. ASPGetParmsRecPtr = ^ASPGetParmsRec;
  461. ASPGetParmsRec = PACKED RECORD
  462.     async : Byte; { asyncronous flag }
  463.     command : Byte; { PAP command to execute }
  464.     result : Integer; { error result from a PAP operation }
  465.     maxCmdSize : Integer;
  466.     maxDataSize : Integer;
  467. END;
  468.  
  469. ASPGetStatusRecHndl = ^ASPGetStatusRecPtr;
  470. ASPGetStatusRecPtr = ^ASPGetStatusRec;
  471. ASPGetStatusRec = PACKED RECORD
  472.     async : Byte; { asyncronous flag }
  473.     command : Byte; { PAP command to execute }
  474.     result : Integer; { error result from a PAP operation }
  475.     completionPtr : Longint; { pointer to the completion routine }
  476.     slsNet : Integer; { SLS Network Number }
  477.     slsNode : Byte; { SLS Node Number }
  478.     slsSocket : Byte; { SLS Socket Number }
  479.     bufferLength : Integer; { Buffer Length }
  480.     bufferAddr : Longint; { Buffer Address }
  481.     dataLength : Integer; { Length of Status Data }
  482. END;
  483.  
  484. ASPOpenSessionRecHndl = ^ASPOpenSessionRecPtr;
  485. ASPOpenSessionRecPtr = ^ASPOpenSessionRec;
  486. ASPOpenSessionRec = PACKED RECORD
  487.     async : Byte; { asyncronous flag }
  488.     command : Byte; { PAP command to execute }
  489.     result : Integer; { error result from a PAP operation }
  490.     completionPtr : Longint; { pointer to the completion routine }
  491.     slsNet : Integer; { SLS Network Number }
  492.     slsNode : Byte; { SLS Node Number }
  493.     slsSocket : Byte; { SLS Socket Number }
  494.     attnRtnAddr : Longint; { Attention Routine Addr }
  495.     refNum : Byte; { Session Reference Number }
  496. END;
  497.  
  498. ASPCloseSessionRecHndl = ^ASPCloseSessionRecPtr;
  499. ASPCloseSessionRecPtr = ^ASPCloseSessionRec;
  500. ASPCloseSessionRec = PACKED RECORD
  501.     async : Byte; { asyncronous flag }
  502.     command : Byte; { PAP command to execute }
  503.     result : Integer; { error result from a PAP operation }
  504.     completionPtr : Longint; { pointer to the completion routine }
  505.     refNum : Byte; { Session Reference Number }
  506. END;
  507.  
  508. ASPCommandRecHndl = ^ASPCommandRecPtr;
  509. ASPCommandRecPtr = ^ASPCommandRec;
  510. ASPCommandRec = PACKED RECORD
  511.     async : Byte; { asyncronous flag }
  512.     command : Byte; { PAP command to execute }
  513.     result : Integer; { error result from a PAP operation }
  514.     completionPtr : Longint; { pointer to the completion routine }
  515.     refNum : Byte; { Session Reference Number }
  516.     cmdBlkLength : Integer; { Command Block Length }
  517.     cmdBlkAddr : Longint; { Command Block Address }
  518.     replyBufferLen : Integer; { Reply Buffer Length }
  519.     replyBufferAddr : Longint; { Reply Buffer Address }
  520.     cmdResult : Longint; { Command Result }
  521.     replyLength : Integer; { Reply Length }
  522. END;
  523.  
  524. ASPWriteRecHndl = ^ASPWriteRecPtr;
  525. ASPWriteRecPtr = ^ASPWriteRec;
  526. ASPWriteRec = PACKED RECORD
  527.     async : Byte; { asyncronous flag }
  528.     command : Byte; { PAP command to execute }
  529.     result : Integer; { error result from a PAP operation }
  530.     completionPtr : Longint; { pointer to the completion routine }
  531.     refNum : Byte; { Session Reference Number }
  532.     cmdBlkLength : Integer; { Command Block Length }
  533.     cmdBlkAddr : Longint; { Command Block Address }
  534.     writeDataLength : Integer; { Write Data Length }
  535.     writeDataAddr : Longint; { Write Data Address }
  536.     replyBufferLen : Integer; { Reply Buffer Length }
  537.     replyBufferAddr : Longint; { Reply Buffer Address }
  538.     cmdResult : Longint; { Command Result }
  539.     writtenLength : Integer; { Written Length }
  540.     replyLength : Integer; { Reply Length }
  541. END;
  542.  
  543. ServerHndl = ^ServerPtr;
  544. ServerPtr = ^Server;
  545. Server = PACKED RECORD
  546.     serverName : Ptr; { Pointer to a Server Entity }
  547.     net : Integer; { Net of the server }
  548.     node : Byte; { Node of the server }
  549.     socket : Byte; { Socket number of the server }
  550. END;
  551.  
  552. ATPSendReqRecHndl = ^ATPSendReqRecPtr;
  553. ATPSendReqRecPtr = ^ATPSendReqRec;
  554. ATPSendReqRec = PACKED RECORD
  555.     async : Byte; { asyncronous flag }
  556.     command : Byte; { ATP command to execute }
  557.     result : Integer; { error result from the ATP operation }
  558.     completionPtr : Longint; { pointer to the completion routine }
  559.     socketID : Byte; { dynamic socket number }
  560.     destNetID : Integer; { destination network # }
  561.     destNodeID : Byte; { destination node # }
  562.     destSocketID : Byte; { destination socket # }
  563.     transactionID : Integer; { transaction ID # }
  564.     reqBufferLength : Integer; { request buffer length }
  565.     reqBufferPtr : Longint; { pointer to the request buffer }
  566.     userBytes : Longint; { user BYTEs }
  567.     numberRespBuffers : Byte; { number of response buffers }
  568.     respBufferPtr : Longint; { pointer to the response buffer }
  569.     atpFlags : Byte; { flags for ATP transaction }
  570.     rInterval : Byte; { timeout before retrying }
  571.     rCount : Byte; { number of retries to attempt }
  572.     bitMap : Byte; { bitmap indicating for packet reception }
  573.     responseRcv : Byte; { number of responses received }
  574.         (* JAM 91.08.13 per memo from Jim Luther *)
  575.     reserved : PACKED ARRAY [1..6] of Byte; { reserved for future use }
  576.         (* in previous versions, this had been simply, Byte *)
  577. END;
  578.  
  579. ATPCancelReqRecHndl = ^ATPCancelReqRecPtr;
  580. ATPCancelReqRecPtr = ^ATPCancelReqRec;
  581. ATPCancelReqRec = PACKED RECORD
  582.     async : Byte; { asyncronous flag }
  583.     command : Byte; { ATP command to execute }
  584.     result : Integer; { error result from ATP operation }
  585.     transactionID : Integer; { transaction ID # }
  586. END;
  587.  
  588. ATPOpenSocketRecHndl = ^ATPOpenSocketRecPtr;
  589. ATPOpenSocketRecPtr = ^ATPOpenSocketRec;
  590. ATPOpenSocketRec = PACKED RECORD
  591.     async : Byte; { asyncronous flag }
  592.     command : Byte; { ATP command to execute }
  593.     result : Integer; { error result from the ATP operation }
  594.     socketID : Byte; { socket number to open }
  595. END;
  596.  
  597. ATPCloseSocketRecHndl = ^ATPCloseSocketRecPtr;
  598. ATPCloseSocketRecPtr = ^ATPCloseSocketRec;
  599. ATPCloseSocketRec = PACKED RECORD
  600.     async : Byte; { asyncronous flag }
  601.     command : Byte; { ATP command to execute }
  602.     result : Integer; { error result from ATP operation }
  603.     socketID : Byte; { socket number for closing }
  604. END;
  605.  
  606. ATPGetReqRecHndl = ^ATPGetReqRecPtr;
  607. ATPGetReqRecPtr = ^ATPGetReqRec;
  608. ATPGetReqRec = PACKED RECORD
  609.     async : Byte; { asyncronous flag }
  610.     command : Byte; { ATP command to execute }
  611.     result : Integer; { error result from ATP operation }
  612.     completionPtr : Longint; { pointer to the completion routine }
  613.     respSocketID : Byte; { response socket # }
  614.     networkID : Integer; { source network # }
  615.     nodeID : Byte; { source node # }
  616.     socketID : Byte; { source socket # }
  617.     transactionID : Integer; { ATP transaction ID }
  618.     reqBufferLength : Integer; { request buffer length }
  619.     reqBufferPtr : Longint; { pointer to request buffer }
  620.     userBytes : Longint; { user BYTEs }
  621.     requestLength : Integer; { actual request length }
  622.     atpFlags : Byte; { ATP operation flags }
  623.     bitMap : Byte; { bitmap for packet reception }
  624.     reserved : Longint; { reserved for future use }
  625. END;
  626.  
  627. ATPSendRespRecHndl = ^ATPSendRespRecPtr;
  628. ATPSendRespRecPtr = ^ATPSendRespRec;
  629. ATPSendRespRec = PACKED RECORD
  630.     async : Byte; { asyncronous flag }
  631.     command : Byte; { ATP command to execute }
  632.     result : Integer; { result to the ATP operation }
  633.     completionPtr : Longint; { pointer to the completion routine }
  634.     socketID : Byte; { response socket # }
  635.     destNetID : Integer; { destination network # }
  636.     destNodeID : Byte; { destination node # }
  637.     destSocketID : Byte; { destination socket # }
  638.     transactionID : Integer; { transaction ID # }
  639.     numRespBuffers : Byte; { number of response buffers }
  640.     totalPackets : Byte; { total ATP packets }
  641.     respBDSPtr : Longint; { pointer to the BDS buffer }
  642.     atpFlags : Byte; { ATP operation flags }
  643.     bitmap : Byte; { bitmap for packet reception }
  644.     reserved : Longint; { must be set to NIL for future compatibility }
  645.     reserved2 : Byte; { must be set to 0 for future compatibility }
  646. END;
  647.  
  648. ATPRelCBRecHndl = ^ATPRelCBRecPtr;
  649. ATPRelCBRecPtr = ^ATPRelCBRec;
  650. ATPRelCBRec = PACKED RECORD
  651.     async : Byte; { asyncronous flag }
  652.     command : Byte; { ATP command to execute }
  653.     result : Integer; { error result to the ATP operation }
  654.     socketID : Byte; { response socket # }
  655.     destNetID : Integer; { destination network # }
  656.     destNodeID : Byte; { destination node # }
  657.     destSocketID : Byte; { destination socket # }
  658.     transactionID : Integer; { ATP transaction ID }
  659. END;
  660.  
  661. RespBDSBufferHndl = ^RespBDSBufferPtr;
  662. RespBDSBufferPtr = ^RespBDSBuffer;
  663. RespBDSBuffer = RECORD
  664.     bufferLength : Integer;
  665.     bufferPtr : Longint;
  666.     userBytes : Longint;
  667.     actualLength : Integer;
  668. END;
  669.  
  670. DDPOpenSocketRecHndl = ^DDPOpenSocketRecPtr;
  671. DDPOpenSocketRecPtr = ^DDPOpenSocketRec;
  672. DDPOpenSocketRec = PACKED RECORD
  673.     async : Byte; { asyncronous flag }
  674.     command : Byte; { DDP command to execute }
  675.     result : Integer; { error result from DDP operation }
  676.     socketNumber : Byte; { socket number opened }
  677.     clientAddr : Longint; { client address }
  678. END;
  679.  
  680. DDPCloseSocketRecHndl = ^DDPCloseSocketRecPtr;
  681. DDPCloseSocketRecPtr = ^DDPCloseSocketRec;
  682. DDPCloseSocketRec = PACKED RECORD
  683.     async : Byte; { asyncronous flag }
  684.     command : Byte; { DDP commnd to execute }
  685.     result : Integer; { error result from DDP operation }
  686.     socketNumber : Byte; { socket # to close }
  687. END;
  688.  
  689. DDPSendDatagramRecHndl = ^DDPSendDatagramRecPtr;
  690. DDPSendDatagramRecPtr = ^DDPSendDatagramRec;
  691. DDPSendDatagramRec = PACKED RECORD
  692.     async : Byte; { asyncronous flag }
  693.     command : Byte; { DDP command to execute }
  694.     result : Integer; { error result from DDP operation }
  695.     checksum : Byte; { calculated checksum }
  696.     destNet : Integer; { destination network # }
  697.     destNode : Byte; { destination node # }
  698.     destSocket : Byte; { destination socket # }
  699.     sourceSocket : Byte; { DDP socket to send from }
  700.     ddpType : Byte; { DDP protocol type }
  701.     bdsPtr : Longint; { pointer to the DDP BDS buffer }
  702. END;
  703.  
  704. LAPWriteRecHndl = ^LAPWriteRecPtr;
  705. LAPWriteRecPtr = ^LAPWriteRec;
  706. LAPWriteRec = PACKED RECORD
  707.     async : Byte; { asyncronous flag }
  708.     command : Byte; { lap command to execute }
  709.     result : Integer; { lap error result code }
  710.     destNode : Byte; { destination node to send packet to }
  711.     lapType : Byte; { lap protocol type to send }
  712.     lapBDSPtr : Longint; { pointer to the lap BDS buffer }
  713. END;
  714.  
  715. LAPReadBufferRecHndl = ^LAPReadBufferRecPtr;
  716. LAPReadBufferRecPtr = ^LAPReadBufferRec;
  717. LAPReadBufferRec = PACKED RECORD
  718.     async : Byte; { asyncronous flag }
  719.     command : Byte; { LAP command to execute }
  720.     result : Integer; { error result of the LAP operation }
  721.     requestCount : Integer; { how many BYTEs to transfer }
  722.     bufferPtr : Longint; { pointer to a buffer to store info }
  723.     purge : Byte; { flag for purging the buffer if wrong size }
  724.     amountTransfered : Integer; { actual amount transfered }
  725. END;
  726.  
  727. LAPAttachProtRecHndl = ^LAPAttachProtRecPtr;
  728. LAPAttachProtRecPtr = ^LAPAttachProtRec;
  729. LAPAttachProtRec = PACKED RECORD
  730.     async : Byte; { asyncronous flag }
  731.     command : Byte; { LAP command to execute }
  732.     result : Integer; { error result of LAP operation }
  733.     protType : Byte; { protocol type specifing the LAP type }
  734.     protAddr : Longint; { protocol address specifing the LAP handler }
  735. END;
  736.  
  737. LAPRemoveProtRecHndl = ^LAPRemoveProtRecPtr;
  738. LAPRemoveProtRecPtr = ^LAPRemoveProtRec;
  739. LAPRemoveProtRec = PACKED RECORD
  740.     async : Byte; { asyncronous flag }
  741.     command : Byte; { LAP command to execute }
  742.     result : Integer; { error result of LAP operation }
  743.     protType : Byte; { protocol type specifing the LAP type }
  744. END;
  745.  
  746. BDSHndl = ^BDSPtr;
  747. BDSPtr = ^BDS;
  748. BDS = RECORD
  749.     BufferLength : Integer;
  750.     BufferPtr : Longint;
  751. END;
  752.  
  753. NBPRNEntityNameRecHndl = ^NBPRNEntityNameRecPtr;
  754. NBPRNEntityNameRecPtr = ^NBPRNEntityNameRec;
  755. NBPRNEntityNameRec = RECORD
  756.     reserved : PACKED ARRAY[1..9] OF Byte;
  757.     entityName : EntName;
  758. END;
  759.  
  760. NBPLUNameBufferRecHndl = ^NBPLUNameBufferRecPtr;
  761. NBPLUNameBufferRecPtr = ^NBPLUNameBufferRec;
  762. NBPLUNameBufferRec = PACKED RECORD
  763.     netNum : Integer;
  764.     nodeNum : Byte;
  765.     socketNum : Byte;
  766.     enumerator : Byte;
  767.     entityName : EntName;
  768. END;
  769.  
  770. NBPRegisterNameRecHndl = ^NBPRegisterNameRecPtr;
  771. NBPRegisterNameRecPtr = ^NBPRegisterNameRec;
  772. NBPRegisterNameRec = PACKED RECORD
  773.     async : Byte; { asyncronous flag }
  774.     command : Byte; { NBP command to execute }
  775.     result : Integer; { error result from NBP operation }
  776.     completionPtr : Longint; { pointer to the completion routine }
  777.     namePtr : Longint; { pointer to the entityType }
  778.     rInterval : Byte; { timeOut period before retrying }
  779.     rCount : Byte; { number of retries to attempt }
  780.     reserved : Integer; { reserved for future use }
  781.     socketNumber : Byte; { socket listner being registered }
  782.     checkFlag : Byte; { flag for checking duplicate names }
  783. END;
  784.  
  785. NBPRemoveNameRecHndl = ^NBPRemoveNameRecPtr;
  786. NBPRemoveNameRecPtr = ^NBPRemoveNameRec;
  787. NBPRemoveNameRec = PACKED RECORD
  788.     async : Byte; { asyncronous flag }
  789.     command : Byte; { NBP command to execute }
  790.     result : Integer; { error result from NBP operation }
  791.     entityPtr : Longint; { pointer to the entity entityType }
  792. END;
  793.  
  794. NBPLookupNameRecHndl = ^NBPLookupNameRecPtr;
  795. NBPLookupNameRecPtr = ^NBPLookupNameRec;
  796. NBPLookupNameRec = PACKED RECORD
  797.     async : Byte; { asyncronous flag }
  798.     command : Byte; { NBP command to execute }
  799.     result : Integer; { error result from NBP operation }
  800.     completionPtr : Longint; { pointer to the completion routine }
  801.     entityPtr : Longint; { pointer to the entity entityType }
  802.     rInterval : Byte; { timeout interval before retrying }
  803.     rCount : Byte; { number of retries to attempt }
  804.     reserved : Integer; { reserved for future use }
  805.     bufferLength : Integer; { length of the user buffer }
  806.     bufferPtr : Longint; { pointer to the user buffer }
  807.     maxMatch : Byte; { maxiumn number of name matches }
  808.     actualMatch : Byte; { actual number of matches }
  809. END;
  810.  
  811. NBPConfirmNameRecHndl = ^NBPConfirmNameRecPtr;
  812. NBPConfirmNameRecPtr = ^NBPConfirmNameRec;
  813. NBPConfirmNameRec = PACKED RECORD
  814.     async : Byte; { asyncronous flag }
  815.     command : Byte; { NBP command to execute }
  816.     result : Integer; { error result from NBP operation }
  817.     completionPtr : Longint; { pointer to the completion routine }
  818.     entityPtr : Longint; { pointer to the entity name }
  819.     rInterval : Byte; { timeout interval before retrying }
  820.     rCount : Byte; { number of retries to attempt }
  821.     reserved : Integer; { reserved for future use }
  822.     networkID : Integer; { network number for confirmation }
  823.     nodeID : Byte; { node number for confirmation }
  824.     socketID : Byte; { socket number for confirmation }
  825.     actualSocketID : Byte; { actual socket number confirmed }
  826. END;
  827.  
  828. NBPKillRecHndl = ^NBPKillRecPtr;
  829. NBPKillRecPtr = ^NBPKillRec;
  830. NBPKillRec = PACKED RECORD
  831.     async : Byte;
  832.     command : Byte;
  833.     result : Integer;
  834.     paramBlockPtr : Ptr;
  835. END;
  836.  
  837. PAPStatusRecHndl = ^PAPStatusRecPtr;
  838. PAPStatusRecPtr = ^PAPStatusRec;
  839. PAPStatusRec = PACKED RECORD
  840.     async : Byte; { asyncronous flag }
  841.     command : Byte; { PAP command to execute }
  842.     result : Integer; { error result from a PAP operation }
  843.     completionPtr : Longint; { pointer to the completion routine }
  844.     printerNamePtr : Longint; { pointer to the printer name }
  845.     statusBufferPtr : Longint; { pointer to the status buffer }
  846. END;
  847.  
  848. PAPOpenRecHndl = ^PAPOpenRecPtr;
  849. PAPOpenRecPtr = ^PAPOpenRec;
  850. PAPOpenRec = PACKED RECORD
  851.     async : Byte; { asyncronous flag }
  852.     command : Byte; { PAP command to execute }
  853.     result : Integer; { error result from a PAP operation }
  854.     completionPtr : Longint; { pointer to the completion routine }
  855.     sessRefID : Byte; { session reference number }
  856.     printerNamePtr : Longint; { printer name pointer }
  857.     flowQuantum : Byte; { number of ATP packets to be sent }
  858.     statusBufferPtr : Longint; { pointer to the status buffer }
  859. END;
  860.  
  861. PAPCloseRecHndl = ^PAPCloseRecPtr;
  862. PAPCloseRecPtr = ^PAPCloseRec;
  863. PAPCloseRec = PACKED RECORD
  864.     async : Byte; { asyncronous flag }
  865.     command : Byte; { PAP command to execute }
  866.     result : Integer; { error result from a PAP operation }
  867.     completionPtr : Longint; { pointer to the completion routine }
  868.     sessRefID : Byte; { session referance number }
  869. END;
  870.  
  871. PAPReadRecHndl = ^PAPReadRecPtr;
  872. PAPReadRecPtr = ^PAPReadRec;
  873. PAPReadRec = PACKED RECORD
  874.     async : Byte; { asyncronous flag }
  875.     command : Byte; { PAP command to execute }
  876.     result : Integer; { error result from a PAP operation }
  877.     completionPtr : Longint; { pointer to the completion routine }
  878.     sessRefID : Byte; { session reference # }
  879.     bufferLength : Integer; { length of the user buffer }
  880.     bufferPtr : Longint; { pointer to the user buffer }
  881.     papEOF : Byte; { end of file flag }
  882. END;
  883.  
  884. PAPWriteRecHndl = ^PAPWriteRecPtr;
  885. PAPWriteRecPtr = ^PAPWriteRec;
  886. PAPWriteRec = PACKED RECORD
  887.     async : Byte; { asyncronous flag }
  888.     command : Byte; { PAP command to execute }
  889.     result : Integer; { error result from a PAP operation }
  890.     completionPtr : Longint; { pointer to the completion routine }
  891.     sessRefID : Byte; { session reference # }
  892.     dataLength : Integer; { data length }
  893.     bufferPtr : Longint; { pointer to the buffer }
  894.     papEOF : Byte; { end of file flag }
  895. END;
  896.  
  897. PAPUnloadRecHndl = ^PAPUnloadRecPtr;
  898. PAPUnloadRecPtr = ^PAPUnloadRec;
  899. PAPUnloadRec = PACKED RECORD
  900.     async : Byte; { asyncronous flag }
  901.     command : Byte; { PAP command to execute }
  902.     result : Integer; { error result from a PAP operation }
  903.     completionPtr : Longint; { pointer to the completion routine }
  904. END;
  905.  
  906. PFIAttentionHeaderRecHndl = ^PFIAttentionHeaderRecPtr;
  907. PFIAttentionHeaderRecPtr = ^PFIAttentionHeaderRec;
  908. PFIAttentionHeaderRec = PACKED RECORD
  909.     sessionRefNum : Byte;
  910.     attenType : Byte;
  911.     atten : Integer;
  912.     serverName : PACKED ARRAY[1..33] OF CHAR;
  913.     zoneName : PACKED ARRAY[1..34] OF CHAR;
  914. END;
  915.  
  916. PFIHooksMountingRecHndl = ^PFIHooksMountingRecPtr;
  917. PFIHooksMountingRecPtr = ^PFIHooksMountingRec;
  918. PFIHooksMountingRec = PACKED RECORD
  919.     sessionRefNum : Byte;
  920.     p8UnitNum : Byte;
  921.     volumeName : PACKED ARRAY[1..29] OF CHAR;
  922.     volumeID : Integer;
  923.     serverName : PACKED ARRAY[1..33] OF CHAR;
  924.     zoneName : PACKED ARRAY[1..34] OF CHAR;
  925. END;
  926.  
  927. PFIUserPrefixRecHndl = ^PFIUserPrefixRecPtr;
  928. PFIUserPrefixRecPtr = ^PFIUserPrefixRec;
  929. PFIUserPrefixRec = PACKED RECORD
  930.     async : Byte; { asyncronous flag }
  931.     command : Byte; { PFI command to execute }
  932.     result : Integer; { error result from PFI operation }
  933.     directionFlag : Byte; { high bit set to point to by User Pointer is stored in PFI }
  934.     userNamePtr : Integer; { name pointed to my User Mane Pointer }
  935. END;
  936.  
  937. PFILoginRecHndl = ^PFILoginRecPtr;
  938. PFILoginRecPtr = ^PFILoginRec;
  939. PFILoginRec = PACKED RECORD
  940.     async : Byte; { asyncronous flag }
  941.     command : Byte; { PFI command to execute }
  942.     result : Integer; { error result from PFI operation }
  943.     networkID : Integer; { network number for confirmation }
  944.     nodeID : Byte; { node number for confirmation }
  945.     socketID : Byte; { socket number for confirmation }
  946.     cmdBufferLength : Integer; { length of the user command buffer }
  947.     cmdBufferPtr : Longint; { pointer to the user command buffer }
  948.     replyBufferLen : Integer; { length of the reply buffer }
  949.     replyBufferPtr : Longint; { pointer to the reply buffer }
  950.     sessRefID : Byte; { session reference number }
  951.     attnRtnAddr : Longint;
  952. END;
  953.  
  954. PFILoginContRecHndl = ^PFILoginContRecPtr;
  955. PFILoginContRecPtr = ^PFILoginContRec;
  956. PFILoginContRec = PACKED RECORD
  957.     async : Byte; { asyncronous flag }
  958.     command : Byte; { PFI command to execute }
  959.     result : Integer; { error result from PFI operation }
  960.     sessRefID : Byte; { session reference number }
  961.     cmdBufferLength : Integer; { length of the user command buffer }
  962.     cmdBufferPtr : Longint; { pointer to the user command buffer }
  963.     replyBufferLen : Integer; { length of the reply buffer }
  964.     replyBufferPtr : Longint; { pointer to the reply buffer }
  965. END;
  966.  
  967. PFILogoutRecHndl = ^PFILogoutRecPtr;
  968. PFILogoutRecPtr = ^PFILogoutRec;
  969. PFILogoutRec = PACKED RECORD
  970.     async : Byte; { asyncronous flag }
  971.     command : Byte; { PFI command to execute }
  972.     result : Integer; { error result from PFI operation }
  973.     sessRefID : Byte; { session reference number }
  974. END;
  975.  
  976. PFIMountvolRecHndl = ^PFIMountvolRecPtr;
  977. PFIMountvolRecPtr = ^PFIMountvolRec;
  978. PFIMountvolRec = PACKED RECORD
  979.     async : Byte; { asyncronous flag }
  980.     command : Byte; { PFI command to execute }
  981.     result : Integer; { error result from PFI operation }
  982.     sessRefID : Byte; { session reference number }
  983.     mountflag : Byte; { mount flag field specifies whether the vol is to be mounted }
  984.     volNamePtr : Longint; { pointer to the volume that will be pseudo-mounted }
  985.     volID : Integer; { volume ID returned by AFP }
  986.     slotDrive : Byte; { the slot/drive in ProDOS format into which the volume was pseudo-mounted }
  987.     passwordPtr : Longint; { pointer to password for the pseudo-mounted volume }
  988. END;
  989.  
  990. PFIListBufferRecHndl = ^PFIListBufferRecPtr;
  991. PFIListBufferRecPtr = ^PFIListBufferRec;
  992. PFIListBufferRec = PACKED RECORD
  993.     sessionRefNum : Byte;
  994.     Slot : Byte;
  995.     volumeName : PACKED ARRAY[1..28] OF Byte;
  996.     volumeID : Integer;
  997. END;
  998.  
  999. PFIListSessionsRecHndl = ^PFIListSessionsRecPtr;
  1000. PFIListSessionsRecPtr = ^PFIListSessionsRec;
  1001. PFIListSessionsRec = PACKED RECORD
  1002.     async : Byte; { asyncronous flag }
  1003.     command : Byte; { PFI command to execute }
  1004.     result : Integer; { error result from PFI operation }
  1005.     bufferLength : Integer; { length of the user buffer }
  1006.     bufferPtr : Longint; { pointer to the user buffer }
  1007.     entriesRtn : Byte; { contains the number of entries returned from the list of current sessions being maintained through the PFI and any volumes mounted for those sessions }
  1008. END;
  1009.  
  1010. PFITimeZoneRecHndl = ^PFITimeZoneRecPtr;
  1011. PFITimeZoneRecPtr = ^PFITimeZoneRec;
  1012. PFITimeZoneRec = PACKED RECORD
  1013.     async : Byte; { asyncronous flag }
  1014.     command : Byte; { PFI command to execute }
  1015.     result : Integer; { error result from PFI operation }
  1016.     timeFlag : Byte; { depending on bit set of the time falg field indicates whether the time should be added to or subtracted from the time zone selected }
  1017. END;
  1018.  
  1019. PFIGetSrcpathRecHndl = ^PFIGetSrcpathRecPtr;
  1020. PFIGetSrcpathRecPtr = ^PFIGetSrcpathRec;
  1021. PFIGetSrcpathRec = PACKED RECORD
  1022.     async : Byte; { asyncronous flag }
  1023.     command : Byte; { PFI command to execute }
  1024.     result : Integer; { error result from PFI operation }
  1025.     bufferPtr : Longint; { pointer to the user buffer where the pathname will be placed }
  1026. END;
  1027.  
  1028. PFIAccessRecHndl = ^PFIAccessRecPtr;
  1029. PFIAccessRecPtr = ^PFIAccessRec;
  1030. PFIAccessRec = PACKED RECORD
  1031.     async : Byte; { asyncronous flag }
  1032.     command : Byte; { PFI command to execute }
  1033.     result : Integer; { error result from PFI operation }
  1034.     directionalFlag : Byte; { if bit 7 of the directional flag is set, the access is being set }
  1035.     accessRights : Longint; { access rights in AFP format }
  1036.     pathnamePtr : Longint; { pointer the path name containing that volume }
  1037.     creatorNamePtr : Longint; { if bit 6 of the directional flag is set, the creator's name will be dealt with }
  1038.     groupNamePtr : Longint; { if bit 5 of the directional flag is set, the group name will be dealt with }
  1039. END;
  1040.  
  1041. PFINamingRecHndl = ^PFINamingRecPtr;
  1042. PFINamingRecPtr = ^PFINamingRec;
  1043. PFINamingRec = PACKED RECORD
  1044.     async : Byte; { asyncronous flag }
  1045.     command : Byte; { PFI command to execute }
  1046.     result : Integer; { error result from PFI operation }
  1047.     directionalFlag : Byte; { if bit 7 of the directional flag is set, the naming convention is being set }
  1048.     namingConvFlag : Byte; { if bit 7 of the naming convention flag is set, the naming convention becomes AFP format }
  1049. END;
  1050.  
  1051. PFIConvertTimeRecHndl = ^PFIConvertTimeRecPtr;
  1052. PFIConvertTimeRecPtr = ^PFIConvertTimeRec;
  1053. PFIConvertTimeRec = PACKED RECORD
  1054.     async : Byte; { asyncronous flag }
  1055.     command : Byte; { PFI command to execute }
  1056.     result : Integer; { error result from PFI operation }
  1057.     formatFlag : Byte; { if the format flag is set to 0, then from date time is AFP format  if the format flag is set to 1, then from date time is ProDOS format }
  1058.     fromDateTime : Longint; { this field contains the From DATE/Time data (values) to convert, not pointers }
  1059.     toDateTime : Longint; { this field contains the TO DATE/Time data (values) to convert, not pointers }
  1060. END;
  1061.  
  1062. PFISetBufferRecHndl = ^PFISetBufferRecPtr;
  1063. PFISetBufferRecPtr = ^PFISetBufferRec;
  1064. PFISetBufferRec = PACKED RECORD
  1065.     async : Byte; { asyncronous flag }
  1066.     command : Byte; { PFI command to execute }
  1067.     result : Integer; { error result from PFI operation }
  1068.     dirFlag : Byte; { $00 or $80 }
  1069.     bufferLength : Integer; { Buffer Length }
  1070.     bufferPtr : Longint; { if the format flag is set to 0, then from date time is AFP format }
  1071. END;
  1072.  
  1073. PFIHooksRecHndl = ^PFIHooksRecPtr;
  1074. PFIHooksRecPtr = ^PFIHooksRec;
  1075. PFIHooksRec = PACKED RECORD
  1076.     async : Byte;
  1077.     command : Byte;
  1078.     result : Integer;
  1079.     hookFlag : Byte;
  1080.     mountVector : Longint;
  1081.     unmountVector : Longint;
  1082.     attentionVector : Longint;
  1083. END;
  1084.  
  1085. PFILogin2RecHndl = ^PFILogin2RecPtr;
  1086. PFILogin2RecPtr = ^PFILogin2Rec;
  1087. PFILogin2Rec = PACKED RECORD
  1088.     async : Byte;
  1089.     command : Byte;
  1090.     result : Integer;
  1091.     networkID : Integer;
  1092.     nodeID : Byte;
  1093.     socketID : Byte;
  1094.     cmdBufferLength : Integer;
  1095.     cmdBufferPtr : Longint;
  1096.     replyBufferLen : Integer;
  1097.     replyBufferPtr : Longint;
  1098.     sessRefID : Byte;
  1099.     attnRtnAddr : Longint;
  1100.     serverName : Ptr;
  1101.     zoneName : Ptr;
  1102.     afpVersionNum : Integer;
  1103. END;
  1104.  
  1105. PFIListSessions2RecHndl = ^PFIListSessions2RecPtr;
  1106. PFIListSessions2RecPtr = ^PFIListSessions2Rec;
  1107. PFIListSessions2Rec = PACKED RECORD
  1108.     async : Byte;
  1109.     command : Byte;
  1110.     result : Integer;
  1111.     bufferLength : Integer;
  1112.     bufferPtr : Longint;
  1113.     entriesRtn : Byte;
  1114. END;
  1115.  
  1116. PFIGetSVersionRecHndl = ^PFIGetSVersionRecPtr;
  1117. PFIGetSVersionRecPtr = ^PFIGetSVersionRec;
  1118. PFIGetSVersionRec = PACKED RECORD
  1119.     async : Byte;
  1120.     command : Byte;
  1121.     result : Integer;
  1122.     sessRefID : Byte;
  1123.     afpVersionNum : Integer;
  1124. END;
  1125.  
  1126. ListSessionsBufferHndl = ^ListSessionsBufferPtr;
  1127. ListSessionsBufferPtr = ^ListSessionsBuffer;
  1128. ListSessionsBuffer = PACKED RECORD
  1129.     refNum : Byte;
  1130.     slotDrive : Byte;
  1131.     volName : PACKED ARRAY[1..28] OF CHAR;
  1132.     volID : Integer;
  1133. END;
  1134.  
  1135. RPMSetPrinterRecHndl = ^RPMSetPrinterRecPtr;
  1136. RPMSetPrinterRecPtr = ^RPMSetPrinterRec;
  1137. RPMSetPrinterRec = PACKED RECORD
  1138.     async : Byte; { asyncronous flag }
  1139.     command : Byte; { RPM command to execute }
  1140.     result : Integer; { error code returned from RPM operation }
  1141.     entityPtr : Longint; { pointer to the entity name }
  1142.     rpmFlags : Byte; { RPM operation flags }
  1143.     flushInterval : Integer; { flush interval }
  1144.     timeOut : Integer; { timeOut }
  1145.     numberBuffers : Integer; { number of buffers allocated }
  1146. END;
  1147.  
  1148. RPMCloseSessionRecHndl = ^RPMCloseSessionRecPtr;
  1149. RPMCloseSessionRecPtr = ^RPMCloseSessionRec;
  1150. RPMCloseSessionRec = PACKED RECORD
  1151.     async : Byte;
  1152.     command : Byte;
  1153.     result : Integer;
  1154. END;
  1155.  
  1156. RPMFlushSessionRecHndl = ^RPMFlushSessionRecPtr;
  1157. RPMFlushSessionRecPtr = ^RPMFlushSessionRec;
  1158. RPMFlushSessionRec = PACKED RECORD
  1159.     async : Byte;
  1160.     command : Byte;
  1161.     result : Byte;
  1162. END;
  1163.  
  1164. ZIPGetMyZoneRecHndl = ^ZIPGetMyZoneRecPtr;
  1165. ZIPGetMyZoneRecPtr = ^ZIPGetMyZoneRec;
  1166. ZIPGetMyZoneRec = PACKED RECORD
  1167.     async : Byte; { asyncronous flag }
  1168.     command : Byte; { ZIP Command to execute }
  1169.     result : Integer; { error result from a ZIP operation }
  1170.     completionPtr : Longint; { Pointer to the completion routine }
  1171.     bufferPtr : Longint; { pointe to the buffer }
  1172.     timeOut : Byte; { timeout interval for retrying }
  1173.     retry : Byte; { number of retries to attempt }
  1174.     reserved : Integer; { reserved for future use }
  1175. END;
  1176.  
  1177. ZIPGetZoneListRecHndl = ^ZIPGetZoneListRecPtr;
  1178. ZIPGetZoneListRecPtr = ^ZIPGetZoneListRec;
  1179. ZIPGetZoneListRec = PACKED RECORD
  1180.     async : Byte; { asyncronous flag }
  1181.     command : Byte; { ZIP command to execute }
  1182.     result : Integer; { error result from a ZIP operation }
  1183.     completionPtr : Longint; { pointer to the completion routine }
  1184.     bufferLength : Integer; { length of the user buffer }
  1185.     bufferPtr : Longint; { pointer to the user buffer }
  1186.     bridgeNodeID : Byte; { bridge node number }
  1187.     startIndex : Integer; { starting index of the buffer }
  1188.     timeOut : Byte; { timeout interval for retrying }
  1189.     retry : Byte; { number of retries to attempt }
  1190.     zonesFound : Integer; { number of zones found }
  1191.     reserved : Integer; { reserved for future use (not clear in manual) }
  1192. END;
  1193.  
  1194. CmdBlockHndl = ^CmdBlockPtr;
  1195. CmdBlockPtr = ^CmdBlock;
  1196. CmdBlock = RECORD
  1197.     cmdLength : Integer; { AFP Command Length }
  1198.     cmdBlkAddr : Ptr; { Address of AFP Command }
  1199.     replyLength : Integer; { Size of Reply Buffer }
  1200.     replyBuffer : Ptr; { Address of Reply Buffer }
  1201.     writeLength : Integer; { Size of Data to be written }
  1202.     writeBuffer : Ptr; { Address of Write Buffer }
  1203. END;
  1204.  
  1205. {
  1206.     Causes packet and timer interrupts to be buffered without
  1207.     being dispatched.  Use with completion routines, socket
  1208.     listeners, and in place of disabling interrupts.
  1209. }
  1210. PROCEDURE RamForbid; INLINE $E1101822;
  1211.  
  1212.  
  1213. {
  1214.     Reenables packet and timer interrupts. 
  1215.     Call after RamForbid.
  1216. }
  1217. PROCEDURE RamPermit; INLINE $E1101C22;
  1218.  
  1219.  
  1220. {
  1221.     AppleTalk calls return result value of type OSErr.
  1222.     This value is valid only for calls that are made syncronously.
  1223. }
  1224.  
  1225. FUNCTION  ASPCloseSession (VAR pBlockPtr:ASPCloseSessionRec) : OSErr ;
  1226.        INLINE $FA,$7A,$E1101422,$0183;
  1227. FUNCTION  ASPCommand (VAR pBlockPtr:ASPCommandRec) : OSErr ;
  1228.        INLINE $FA,$7A,$E1101422,$0183;
  1229. FUNCTION  ASPGetParms (VAR pBlockPtr:ASPGetParmsRec) : OSErr ;
  1230.        INLINE $FA,$7A,$E1101422,$0183;
  1231. FUNCTION  ASPGetStatus (VAR pBlockPtr:ASPGetStatusRec) : OSErr ;
  1232.        INLINE $FA,$7A,$E1101422,$0183;
  1233. FUNCTION  ASPOpenSession (VAR pBlockPtr:ASPOpenSessionRec) : OSErr ;
  1234.        INLINE $FA,$7A,$E1101422,$0183;
  1235. FUNCTION  ASPWrite (VAR pBlockPtr:ASPWriteRec) : OSErr ;
  1236.        INLINE $FA,$7A,$E1101422,$0183;
  1237. FUNCTION  ATBoot (VAR pBlockPtr:ATBootRecPtr) : OSErr ;
  1238.        INLINE $FA,$7A,$E1101422,$0183;
  1239. FUNCTION  ATCancelTimer (VAR pBlockPtr:ATCancelTimerRec) : OSErr ;
  1240.        INLINE $FA,$7A,$E1101422,$0183;
  1241. FUNCTION  ATGetGlobal (VAR pBlockPtr:ATGetGlobalRec) : OSErr ;
  1242.        INLINE $FA,$7A,$E1101422,$0183;
  1243. FUNCTION  ATGetInfo (VAR pBlockPtr:ATGetInfoRec) : OSErr ;
  1244.        INLINE $FA,$7A,$E1101422,$0183;
  1245. FUNCTION  ATInstallTimer (VAR pBlockPtr:ATInstallTimerRec) : OSErr ;
  1246.        INLINE $FA,$7A,$E1101422,$0183;
  1247. FUNCTION  ATPCancelReq (VAR pBlockPtr:ATPCancelReqRec) : OSErr ;
  1248.        INLINE $FA,$7A,$E1101422,$0183;
  1249. FUNCTION  ATPCloseSocket (VAR pBlockPtr:ATPCloseSocketRec) : OSErr ;
  1250.        INLINE $FA,$7A,$E1101422,$0183;
  1251. FUNCTION  ATPGetReq (VAR pBlockPtr:ATPGetReqRec) : OSErr ;
  1252.        INLINE $FA,$7A,$E1101422,$0183;
  1253. FUNCTION  ATPOpenSocket (VAR pBlockPtr:ATPOpenSocketRec) : OSErr ;
  1254.        INLINE $FA,$7A,$E1101422,$0183;
  1255. FUNCTION  ATPRelCB (VAR pBlockPtr:ATPRelCBRec) : OSErr ;
  1256.        INLINE $FA,$7A,$E1101422,$0183;
  1257. FUNCTION  ATPSendReq (VAR pBlockPtr:ATPSendReqRec) : OSErr ;
  1258.        INLINE $FA,$7A,$E1101422,$0183;
  1259. FUNCTION  ATPSendResp (VAR pBlockPtr:ATPSendRespRec) : OSErr ;
  1260.        INLINE $FA,$7A,$E1101422,$0183;
  1261. FUNCTION  ATRemoveTimer (VAR pBlockPtr:ATInstallTimerRec) : OSErr ;
  1262.        INLINE $FA,$7A,$E1101422,$0183;
  1263. FUNCTION  DDPCloseSocket (VAR pBlockPtr:DDPCloseSocketRec) : OSErr ;
  1264.        INLINE $FA,$7A,$E1101422,$0183;
  1265. FUNCTION  DDPOpenSocket (VAR pBlockPtr:DDPOpenSocketRec) : OSErr ;
  1266.        INLINE $FA,$7A,$E1101422,$0183;
  1267. FUNCTION  DDPSendDatagram (VAR pBlockPtr:DDPSendDatagramRec) : OSErr ;
  1268.        INLINE $FA,$7A,$E1101422,$0183;
  1269. FUNCTION  LAPAttachProt (VAR pBlockPtr:LAPAttachProtRec) : OSErr ;
  1270.        INLINE $FA,$7A,$E1101422,$0183;
  1271. FUNCTION  LAPReadBuffer (VAR pBlockPtr:LAPReadBufferRec) : OSErr ;
  1272.        INLINE $FA,$7A,$E1101422,$0183;
  1273. FUNCTION  LAPRemoveProt (VAR pBlockPtr:LAPRemoveProtRec) : OSErr ;
  1274.        INLINE $FA,$7A,$E1101422,$0183;
  1275. FUNCTION  LAPWrite (VAR pBlockPtr:LAPWriteRec) : OSErr ;
  1276.        INLINE $FA,$7A,$E1101422,$0183;
  1277. FUNCTION  NBPConfirmName (VAR pBlockPtr:NBPConfirmNameRec) : OSErr ;
  1278.        INLINE $FA,$7A,$E1101422,$0183;
  1279. FUNCTION  NBPKill (VAR pBlockPtr:NBPKillRec) : OSErr ;
  1280.        INLINE $FA,$7A,$E1101422,$0183;
  1281. FUNCTION  NBPLookupName (VAR pBlockPtr:NBPLookupNameRec) : OSErr ;
  1282.        INLINE $FA,$7A,$E1101422,$0183;
  1283. FUNCTION  NBPRegisterName (VAR pBlockPtr:NBPRegisterNameRec) : OSErr ;
  1284.        INLINE $FA,$7A,$E1101422,$0183;
  1285. FUNCTION  NBPRemoveName (VAR pBlockPtr:NBPRemoveNameRec) : OSErr ;
  1286.        INLINE $FA,$7A,$E1101422,$0183;
  1287. FUNCTION  PAPClose (VAR pBlockPtr:PAPCloseRec) : OSErr ;
  1288.        INLINE $FA,$7A,$E1101422,$0183;
  1289. FUNCTION  PAPOpen (VAR pBlockPtr:PAPOpenRec) : OSErr ;
  1290.        INLINE $FA,$7A,$E1101422,$0183;
  1291. FUNCTION  PAPRead (VAR pBlockPtr:PAPReadRec) : OSErr ;
  1292.        INLINE $FA,$7A,$E1101422,$0183;
  1293. FUNCTION  PAPStatus (VAR pBlockPtr:PAPStatusRec) : OSErr ;
  1294.        INLINE $FA,$7A,$E1101422,$0183;
  1295. FUNCTION  PAPUnload (VAR pBlockPtr:PAPUnloadRec) : OSErr ;
  1296.        INLINE $FA,$7A,$E1101422,$0183;
  1297. FUNCTION  PAPWrite (VAR pBlockPtr:PAPWriteRec) : OSErr ;
  1298.        INLINE $FA,$7A,$E1101422,$0183;
  1299. FUNCTION  PFIAccess (VAR pBlockPtr:PFIAccessRec) : OSErr ;
  1300.        INLINE $FA,$7A,$E1101422,$0183;
  1301. FUNCTION  PFIConvertTime (VAR pBlockPtr:PFIConvertTimeRec) : OSErr ;
  1302.        INLINE $FA,$7A,$E1101422,$0183;
  1303. FUNCTION  PFIGetSrcPath (VAR pBlockPtr:PFIGetSrcpathRec) : OSErr ;
  1304.        INLINE $FA,$7A,$E1101422,$0183;
  1305. FUNCTION  PFIGetSVersion (VAR pBlockPtr:PFIGetSVersionRec) : OSErr ;
  1306.        INLINE $FA,$7A,$E1101422,$0183;
  1307. FUNCTION  PFIHooks (VAR pBlockPtr:PFIHooksRec) : OSErr ;
  1308.        INLINE $FA,$7A,$E1101422,$0183;
  1309. FUNCTION  PFIListSessions (VAR pBlockPtr:PFIListSessionsRec) : OSErr ;
  1310.        INLINE $FA,$7A,$E1101422,$0183;
  1311. FUNCTION  PFIListSessions2 (VAR pBlockPtr:PFIListSessions2Rec) : OSErr ;
  1312.        INLINE $FA,$7A,$E1101422,$0183;
  1313. FUNCTION  PFILogin (VAR pBlockPtr:PFILoginRec) : OSErr ;
  1314.        INLINE $FA,$7A,$E1101422,$0183;
  1315. FUNCTION  PFILogin2 (VAR pBlockPtr:PFILogin2Rec) : OSErr ;
  1316.        INLINE $FA,$7A,$E1101422,$0183;
  1317. FUNCTION  PFILoginCont (VAR pBlockPtr:PFILoginContRec) : OSErr ;
  1318.        INLINE $FA,$7A,$E1101422,$0183;
  1319. FUNCTION  PFILogOut (VAR pBlockPtr:PFILogoutRec) : OSErr ;
  1320.        INLINE $FA,$7A,$E1101422,$0183;
  1321. FUNCTION  PFIMountVol (VAR pBlockPtr:PFIMountvolRec) : OSErr ;
  1322.        INLINE $FA,$7A,$E1101422,$0183;
  1323. FUNCTION  PFINaming (VAR pBlockPtr:PFINamingRec) : OSErr ;
  1324.        INLINE $FA,$7A,$E1101422,$0183;
  1325. FUNCTION  PFISetBuffer (VAR pBlockPtr:PFISetBufferRec) : OSErr ;
  1326.        INLINE $FA,$7A,$E1101422,$0183;
  1327. FUNCTION  PFITimeZone (VAR pBlockPtr:PFITimeZoneRec) : OSErr ;
  1328.        INLINE $FA,$7A,$E1101422,$0183;
  1329. FUNCTION  PFIUserPrefix (VAR pBlockPtr:PFIUserPrefixRec) : OSErr ;
  1330.        INLINE $FA,$7A,$E1101422,$0183;
  1331. FUNCTION  RPMCloseSession (VAR pBlockPtr:RPMCloseSessionRecPtr) : OSErr ;
  1332.        INLINE $FA,$7A,$E1101422,$0183;
  1333. FUNCTION  RPMFlushSession (VAR pBlockPtr:RPMFlushSessionRecPtr) : OSErr ;
  1334.        INLINE $FA,$7A,$E1101422,$0183;
  1335. FUNCTION  RPMSetPrinter (VAR pBlockPtr:RPMSetPrinterRecPtr) : OSErr ;
  1336.        INLINE $FA,$7A,$E1101422,$0183;
  1337. FUNCTION  ZIPGetMyZone (VAR pBlockPtr:ZIPGetMyZoneRec) : OSErr ;
  1338.        INLINE $FA,$7A,$E1101422,$0183;
  1339. FUNCTION  ZIPGetZoneList (VAR pBlockPtr:ZIPGetZoneListRec) : OSErr ;
  1340.        INLINE $FA,$7A,$E1101422,$0183;
  1341.  
  1342. IMPLEMENTATION
  1343.  
  1344. END.
  1345.